package com.afu.strategy;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ClassName: ParkingTypeEnum
 * Package: com.afu.strategy
 * Description:
 *
 * @Version 1.0
 */
@Getter
@AllArgsConstructor
public enum ParkingTypeEnum {
    DAHUA(1,"dahuaParking","DAHUAip","9000","DAHUAdescription1"),
    HIK(2,"hikParking","HIKkip","9001","HIKdescription2"),
    SHANGJI(3,"shangJiParking","SHANGJIip","9002","SHANGJIdescription3");

    private final int id;
    private final String name;
    private final String ip;
    private final String port;
    private final String description;

    public static ParkingTypeEnum getByName(String name){
        ParkingTypeEnum[] values = ParkingTypeEnum.values();
        for (ParkingTypeEnum value : values) {
            if (value.getName().equals(name)){
                return value;
            }
        }
        return null;
    }
}
